Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions That Modify Movie Properties / Working With Data References


SetMediaDataRef

The SetMediaDataRef function changes the file that the specified media identifies as the location for its data storage.

pascal OSErr SetMediaDataRef (Media themedia, short index, 
                              Handle dataRef, OSType dataRefType);
themedia
Specifies the media for this operation. Your application obtains this media identifier from such Movie Toolbox functions as NewTrackMedia and GetTrackMedia (described on page 2-138 and page 2-190, respectively).
index
Contains a pointer to a short integer. The Movie Toolbox returns the index value that is assigned to the new data reference. Your application can use this index to identify the reference to other Movie Toolbox functions, such as GetMediaDataRef (described on page 2-201). As with all data reference functions, the index starts with 1. If the Movie Toolbox cannot add the data reference to the media, it sets the returned index value to 0.
dataRef
Specifies the data reference. This parameter contains a handle to the information that identifies the file that contains this media's data. The type of information stored in that handle depends upon the value of the dataRefType parameter.
dataRefType
Specifies the type of data reference. If the data reference is an alias, you must set this parameter to rAliasType ('alis'), indicating that the reference is an alias. See Inside Macintosh: Files for more information about aliases and the Alias Manager.
SPECIAL CONSIDERATIONS
Don't call this function unless you have a really good reason. However, if you want to resolve your own missing data references, or you are developing a special-purpose kind of application, SetMediaDataRef may be quite useful.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996